
package com.bear.cmcc.NetTestHTTP.component;

import com.bear.cmcc.NetTestHTTP.constant.MyCommonConstant;
import com.bear.cmcc.NetTestHTTP.util.MyCommonUtil;

import android.text.TextUtils;

public class BaseBean {

    /**
     * TD 网络情况，下载速度（kb/s）。
     */
    public String td_downSpeed = "0";

    /**
     * 2G 网络情况，下载速度（kb/s）。
     */
    public String gprs_downSpeed = "0";

    /**
     * wlan 网络情况，下载速度（kb/s）。
     */
    public String wlan_downSpeed = "0";

    /**
     * TD排名。
     */
    public int td_Rand = 0;

    /**
     * 2G排名。
     */
    public int twoG_Rand = 0;

    /**
     * 网络类型：含义见MyCommonConstant.NET_TYPE。
     */
    private String netType = MyCommonConstant.NET_TYPE.UNKNOW;

    public String getNetType() {
        return netType;
    }

    public void setNetType(String netType) {
        this.netType = netType;
    }

    public int getTd_Rand() {
        return td_Rand;
    }

    public void setTd_Rand(int td_Rand) {
        this.td_Rand = td_Rand;
    }

    public int getTwoG_Rand() {
        return twoG_Rand;
    }

    public void setTwoG_Rand(int twoG_Rand) {
        this.twoG_Rand = twoG_Rand;
    }

    public String getTd_downSpeed() {
        if (!TextUtils.isEmpty(td_downSpeed)) {
            return MyCommonUtil.getFormatString(Double.valueOf(td_downSpeed));
        }
        return td_downSpeed;
    }
    
    public int getTd_downSpeedInt() {
        if (!TextUtils.isEmpty(td_downSpeed)) {
            return Double.valueOf(td_downSpeed).intValue();
        }
        return 0;
    }

    public void setTd_downSpeed(String td_downSpeed) {
        this.td_downSpeed = td_downSpeed;
    }

    public String getGprs_downSpeed() {
        if (!TextUtils.isEmpty(gprs_downSpeed)) {
            return MyCommonUtil.getFormatString(Double.valueOf(gprs_downSpeed));
        }
        return gprs_downSpeed;
    }
    
    public int getGprs_downSpeedInt() {
       
        if (!TextUtils.isEmpty(gprs_downSpeed )) {
            return Double.valueOf(gprs_downSpeed).intValue();
        }
        return 0;
    }

    public void setGprs_downSpeed(String gprs_downSpeed) {
        this.gprs_downSpeed = gprs_downSpeed;
    }

    public String getWlan_downSpeed() {
        if (!TextUtils.isEmpty(wlan_downSpeed )) {
            return MyCommonUtil.getFormatString(Double.valueOf(wlan_downSpeed));
        }
        return wlan_downSpeed;
    }

    public void setWlan_downSpeed(String wlan_downSpeed) {
        this.wlan_downSpeed = wlan_downSpeed;
    }

    @Override
    public String toString() {
        return "BaseBean [td_downSpeed=" + td_downSpeed + ", gprs_downSpeed=" + gprs_downSpeed
                + ", wlan_downSpeed=" + wlan_downSpeed + ", td_Rand=" + td_Rand + ", twoG_Rand="
                + twoG_Rand + ", netType=" + netType + "]";
    }

}
